package com.ruoyi.clothing.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.clothing.mapper.SysAddressMapper;
import com.ruoyi.clothing.domain.SysAddress;
import com.ruoyi.clothing.service.ISysAddressService;

/**
 * 地址管理Service业务层处理
 *
 * @author weh
 * @date 2024-01-18
 */
@Service
public class SysAddressServiceImpl implements ISysAddressService
{
    @Autowired
    private SysAddressMapper sysAddressMapper;

    /**
     * 查询地址管理
     *
     * @param id 地址管理主键
     * @return 地址管理
     */
    @Override
    public SysAddress selectSysAddressById(Integer id)
    {
        return sysAddressMapper.selectSysAddressById(id);
    }

    /**
     * 查询地址管理列表
     *
     * @param sysAddress 地址管理
     * @return 地址管理
     */
    @Override
    public List<SysAddress> selectSysAddressList(SysAddress sysAddress)
    {
        return sysAddressMapper.selectSysAddressList(sysAddress);
    }

    /**
     * 新增地址管理
     *
     * @param sysAddress 地址管理
     * @return 结果
     */
    @Override
    public int insertSysAddress(SysAddress sysAddress)
    {
        return sysAddressMapper.insertSysAddress(sysAddress);
    }

    /**
     * 修改地址管理
     *
     * @param sysAddress 地址管理
     * @return 结果
     */
    @Override
    public int updateSysAddress(SysAddress sysAddress)
    {
        return sysAddressMapper.updateSysAddress(sysAddress);
    }

    /**
     * 批量删除地址管理
     *
     * @param ids 需要删除的地址管理主键
     * @return 结果
     */
    @Override
    public int deleteSysAddressByIds(Integer[] ids)
    {
        return sysAddressMapper.deleteSysAddressByIds(ids);
    }

    /**
     * 删除地址管理信息
     *
     * @param id 地址管理主键
     * @return 结果
     */
    @Override
    public int deleteSysAddressById(Integer id)
    {
        return sysAddressMapper.deleteSysAddressById(id);
    }

    @Override
    public List<SysAddress> selectAddressListById(Long address_owner) {
        return sysAddressMapper.selectAddressListById(address_owner);
    }

    @Override
    public int insertSysAddressWithID(Map map) {
        return sysAddressMapper.insertSysAddressWithID(map);
    }

    @Override
    public int deleteAddressById(Integer id) {
        return sysAddressMapper.deleteSysAddressById(id);
    }
}
